package com.ruoyi.my.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.my.mapper.GrInterviewMapper;
import com.ruoyi.my.domain.GrInterview;
import com.ruoyi.my.service.IGrInterviewService;

/**
 * 面试Service业务层处理
 *
 * @author liuxusheng
 * @date 2022-01-13
 */
@Service
public class GrInterviewServiceImpl implements IGrInterviewService {
    @Autowired
    private GrInterviewMapper grInterviewMapper;

    /**
     * 查询面试
     *
     * @param id 面试主键
     * @return 面试
     */
    @Override
    public GrInterview selectGrInterviewById(Long id) {
        return grInterviewMapper.selectGrInterviewById(id);
    }

    /**
     * 查询面试列表
     *
     * @param grInterview 面试
     * @return 面试
     */
    @Override
    public List<GrInterview> selectGrInterviewList(GrInterview grInterview) {
        return grInterviewMapper.selectGrInterviewList(grInterview);
    }

    /**
     * 新增面试
     *
     * @param grInterview 面试
     * @return 结果
     */
    @Override
    public int insertGrInterview(GrInterview grInterview) {
                grInterview.setCreateTime(DateUtils.getNowDate());
            return grInterviewMapper.insertGrInterview(grInterview);
    }

    /**
     * 修改面试
     *
     * @param grInterview 面试
     * @return 结果
     */
    @Override
    public int updateGrInterview(GrInterview grInterview) {
                grInterview.setUpdateTime(DateUtils.getNowDate());
        return grInterviewMapper.updateGrInterview(grInterview);
    }

    /**
     * 批量删除面试
     *
     * @param ids 需要删除的面试主键
     * @return 结果
     */
    @Override
    public int deleteGrInterviewByIds(Long[] ids) {
        return grInterviewMapper.deleteGrInterviewByIds(ids);
    }

    /**
     * 删除面试信息
     *
     * @param id 面试主键
     * @return 结果
     */
    @Override
    public int deleteGrInterviewById(Long id) {
        return grInterviewMapper.deleteGrInterviewById(id);
    }
}
